package com.fjut.kms.service;

import com.fjut.kms.dao.ParametersDao;
import com.fjut.kms.dao.ParametersJDBCImpl;
import com.fjut.kms.domain.Parameters;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Empathy on 2017/8/16.
 */
public class ParametersServiceImpl implements ParametersService {
    public String getParaList(String paraName){
        ParametersDao deptDao=new ParametersJDBCImpl();
        List<Parameters> paraList=new ArrayList<Parameters>();
        paraList=deptDao.getParametersList(paraName);
        if (paraList==null) return "";
        StringBuffer sb=new StringBuffer();
        for (Parameters para:paraList) {
            sb.append(para.getParaValue()).append(",");
        }
        return sb!=null?sb.toString():"";
    }
}
